package com.jayson.myblog.service.impl;

import com.jayson.myblog.pojo.BlogArticle;
import com.jayson.myblog.repository.BlogArticleRepository;
import com.jayson.myblog.service.BlogArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;

@Component
public class BlogArticleServiceImpl implements BlogArticleService {

    @Autowired
    private BlogArticleRepository repository;

    @Override
    public Page<BlogArticle> findPage(Pageable pageable) {
        return repository.findAll(pageable);
    }
}
